<template>
  <v-app id="inspire">
    <v-navigation-drawer v-model="drawer" app clipped>
      <v-list dense>
        <v-list-item link>
          <v-list-item-action>
            <v-icon>mdi-view-dashboard</v-icon>
          </v-list-item-action>
          <v-list-item-content>
            <v-list-item-title>
              <v-btn text small to="/">主页</v-btn>
            </v-list-item-title>
          </v-list-item-content>
        </v-list-item>

        <v-list-group
          v-for="item in items"
          :key="item.title"
          v-model="item.active"
          :prepend-icon="item.action"
          no-action
        >
          <template v-slot:activator>
            <v-list-item-content>
              <v-list-item-title v-text="item.title"></v-list-item-title>
            </v-list-item-content>
          </template>

          <v-list-item link v-for="subItem in item.items" :key="subItem.title">
            <v-list-item-content>
              <v-list-item-title>
                <!-- <v-btn text small :to="subItem.url">{{subItem.title}}</v-btn> -->
                <router-link tag="span" :to="subItem.url">{{subItem.title}}</router-link>
              </v-list-item-title>
            </v-list-item-content>
          </v-list-item>
        </v-list-group>
      </v-list>
    </v-navigation-drawer>

    <v-app-bar app clipped-left>
      <v-app-bar-nav-icon @click.stop="drawer = !drawer" />
      <v-toolbar-title>会计核算</v-toolbar-title>
    </v-app-bar>

    <v-content>
      <v-breadcrumbs :items="items2">
        <template v-slot:item="props">
          <v-breadcrumbs-item
            :href="props.item.href"
            :class="[props.item.disabled && 'disabled']"
          >{{ props.item.text.toUpperCase() }}</v-breadcrumbs-item>
        </template>
      </v-breadcrumbs>
      <router-view />
    </v-content>

    <v-footer app>
      <span>&copy; 2019</span>
    </v-footer>
  </v-app>
</template>

<script>
export default {
  props: {
    source: String
  },
  data: () => ({
    drawer: null,
    items: [
      {
        action: "mdi-settings",
        title: "记账引擎配置管理",
        items: [
           { title: "科目信息", url: "/subject" },
           {title:'公共参数',url:'/acfd02'},
           { title: "公共字典管理", url: "/dict" },
           { title: "交易清算方式配置", url: "/acfb08" },
           { title: "核算产品映射", url: "/acfd05" },
           { title: "核算产品属性", url: "/acfm08" },
           { title: "核算产品业务代号映射", url: "/acfb07" },
            { title: "事件定义", url: "/acfb19" },
           { title: "传票解析规则", url: "/acfb06" },
           
          
          
          
        ]
      },
      {
        action: "mdi-settings",
        title: "清算引擎配置管理",
        items: [
           { title: "机构信息维护", url: "/orgInfo" },
           { title: "清算机构维护", url: "/orgClearInfo" },
           { title: "清算路径维护", url: "/orgClearPath" },
           { title: "机构关系树维护", url: "/brcCtrlShip" }
        ]
      },
      {
        action: "mdi-account",
        title: "交易测试",
        items: [
          { title: "主流水", url: "/acfm15" },
          { title: "子流水", url: "/acfm16" },
           { title: "子流水辅助", url: "/acfe17" },
          { title: "报文测试", url: "/baowen" },
          { title: "传票表", url: "/accDetail" },
          { title: "内部账户表", url: "/iaAccInfo" },
        ]
      },
      // {
      //   action: "mdi-currency-cny",
      //   title: "个人事务",
      //   items: [
      //     { title: "考核申请", url: "/asses" },
      //      { title: "招聘计划", url: "/recruitPlan" },
      //       { title: "转正考核", url: "/assesConfim" },
      //        { title: "申请信息", url: "/apply" },
      //     ]
      // },
      // {
      //   action: "mdi-clock-check",
      //   title: "项目管理",
      //   items: [{ title: "项目信息", url: "/projectInfo" }]
      // },
      // {
      //   action: "mdi-hammer",
      //   title: "行政管理",
      //   items: [{ title: "List Item", url: "/" }]
      // },

      // {
      //   action: "mdi-antenna",
      //   title: "新闻管理",
      //   items: [{ title: "List Item", url: "/" }]
      // }
    ],

    items2: [
      {
        text: "主页",
        disabled: false,
        href: "/"
      },
      {
        text: "系统管理",
        disabled: false,
        href: "breadcrumbs_link_1"
      },
      {
        text: "引擎配置",
        disabled: true,
        href: "breadcrumbs_link_2"
      },
      
    ]
  }),
  created() {
    //this.$vuetify.theme.dark = true; 
  }
};
</script>
<style scoped>
.disabled {
  color: grey;
  pointer-events: none;
}
.router-link-active{
    color: aliceblue; 
    font-size: small;
    color: blueviolet

  }
</style>

